package edu.ynu.se.xiecheng.achitectureclass.dao;

import edu.ynu.se.xiecheng.achitectureclass.entity.DeviceData_5;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import edu.ynu.se.xiecheng.achitectureclass.common.dao.LogicDAO;

import java.util.List;

@Repository
public interface DeviceData_5Dao extends LogicDAO<DeviceData_5, Long> {
    @Query("SELECT s FROM DeviceData_5 s WHERE s.isDeleted = 0 ORDER BY s.timestamp DESC")
    List<DeviceData_5> findLatestOne();
} 